package com.codeanalysissys.backend.config;

import com.codeanalysissys.backend.enums.LangToEnumConverterFactory;
import com.codeanalysissys.backend.enums.TypeToEnumConverterFactory;
import org.springframework.context.annotation.Configuration;
import org.springframework.format.FormatterRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

@Configuration
public class WebConfig implements WebMvcConfigurer {
    @Override
    public void addFormatters(FormatterRegistry registry) {
        registry.addConverterFactory(new TypeToEnumConverterFactory());
        registry.addConverterFactory(new LangToEnumConverterFactory());
    }
}
